package com.hk.blog.service;

import com.hk.blog.domain.CategoryInfo;
import com.hk.commons.query.Order;
import com.hk.core.service.jpa.JpaBaseService;

import java.util.List;


/**
 * @author Kevin
 */
public interface CategoryInfoService extends JpaBaseService<CategoryInfo, Long> {

    boolean existsByCategoryName(Long userId, String categoryName);

    List<CategoryInfo> findByUserId(Long userId, Order... orders);

    void subtractArticleNum(Long id, int articleNum);

    void addArticleNum(Long id, int articleNum);
}
